import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity({ name: 'admins' })
class Admin {
  @PrimaryGeneratedColumn({ zerofill: true })
  adminId: number;

  @Column({ length: 20 })
  username: string;

  @Column({ length: 25 })
  email: string;

  @Column({ length: 255 })
  password: string;

  @Column({ default: 0 })
  status: number;

  @Column({ 'type': 'timestamp', 'default': () => 'CURRENT_TIMESTAMP' })
  createTime: Date;
}

export {
  Admin as AdminEntity
};